import { T } from "antd/lib/upload/utils"

const deviceRepair = {
    // 维修单
    repairList: [
        {
            title: '序号',
            key: 'number',
            render: () => { },
        },
        {
            title: '设备名称',
            dataIndex: 'deviceName',
            key: 'deviceName',
            render: (text) => (
                <>
                    <div>{text.substring(0, 10)}</div>
                    <div>{text.substring(10)}</div>
                </>
            )
        },
        {
            title: '设备使用部门',
            dataIndex: 'groupName',
            key: 'groupName',
        },
        {
            title: '维修描述',
            dataIndex: 'repairRemark',
            key: 'repairRemark',
            render: () => { },
        },
        {
            title: '报修员',
            dataIndex: 'repairClerkName',
            key: 'repairClerkName',
        },
        {
            title: '报修时间',
            dataIndex: 'repairTime',
            key: 'repairTime',
        },
        {
            title: '维修员',
            dataIndex: 'repairmanName',
            key: 'repairmanName',
        },
        {
            title: '维修员电话',
            dataIndex: 'repairmanTel',
            key: 'repairmanTel',
        },
        {
            title: '状态',
            key: 'status',
            render: () => { },
        },
        {
            title: '操作',
            key: 'action',
            render: () => { },
        }],
    // 整改单
    reformList: [
        {
            title: '序号',
            key: 'number',
            render: () => { },
        },
        {
            title: '设备名称',
            dataIndex: 'deviceName',
            key: 'deviceName',
        },
        {
            title: '设备使用部门',
            dataIndex: 'groupName',
            key: 'groupName',
        },
        {
            title: '整改原因',
            dataIndex: 'reason',
            key: 'reason',
            render: () => { },
        },
        {
            title: '整改截止时间',
            dataIndex: 'endTime',
            key: 'endTime',
        },
        {
            title: '报修员',
            dataIndex: 'repairClerkName',
            key: 'repairClerkName',
        },
        {
            title: '报修时间',
            dataIndex: 'repairTime',
            key: 'repairTime',
        },
        {
            title: '维修员',
            dataIndex: 'repairmanName',
            key: 'repairmanName',
        },
        {
            title: '维修员电话',
            dataIndex: 'repairmanTel',
            key: 'repairmanTel',
        },
        {
            title: '状态',
            key: 'status',
            render: () => { },
        },
        {
            title: '操作',
            key: 'action',
            render: () => { },
        }],
    // 投诉单
    complainList: [
        {
            title: '序号',
            key: 'number',
            render: () => { },
        },
        {
            title: '设备名称',
            dataIndex: 'deviceName',
            key: 'deviceName',
        },
        {
            title: '设备使用部门',
            dataIndex: 'groupName',
            key: 'groupName',
        },
        {
            title: '投诉原因',
            dataIndex: 'reason',
            key: 'reason',
            render: (t) => {
                if (t && t.length > 10) {
                    let txt = t.slice(0, 10)
                    return txt + '...'
                }
                return t
            },
        },
        {
            title: '投诉时间',
            dataIndex: 'complaintTime',
            key: 'complaintTime',
        },
        {
            title: '报修员',
            dataIndex: 'repairClerkName',
            key: 'repairClerkName',
        },
        {
            title: '报修时间',
            dataIndex: 'repairTime',
            key: 'repairTime',
        },
        {
            title: '维修员',
            dataIndex: 'repairmanName',
            key: 'repairmanName',
        },
        {
            title: '维修员电话',
            dataIndex: 'repairmanTel',
            key: 'repairmanTel',
        },
        {
            title: '状态',
            key: 'status',
            render: () => { },
        },
        {
            title: '操作',
            key: 'action',
            align: 'right',
            render: () => { },
        }],
    // 点检异常资料
    checkError: [
        {
            title: '序号',
            key: 'number',
            render: () => { },
        }, {
            title: '项目名称',
            dataIndex: 'name',
            key: 'name',
        }, {
            title: '任务执行时间',
            dataIndex: 'actionTime',
            key: 'actionTime',
            render: () => { }
        }, {
            title: '项目执行状态',
            dataIndex: 'status',
            key: 'status',
            render: () => { },
        }, {
            title: '执行结果',
            dataIndex: 'result',
            key: 'result',
            render: () => { }
        }, {
            title: '点检图片',
            dataIndex: 'images',
            key: 'images',
            render: () => { }
        }, {
            title: '点检噪音',
            dataIndex: 'voices',
            width: 100,
            key: 'voices',
            render: () => { }
        }],

    // 保养异常资料
    maintenanceError: [
        {
            title: '序号',
            key: 'number',
            render: () => { },
        }, {
            title: '项目名称',
            dataIndex: 'name',
            key: 'name',
        }, {
            title: '任务执行时间',
            dataIndex: 'actionTime',
            key: 'actionTime',
            render: () => { }
        }, {
            title: '项目执行状态',
            dataIndex: 'status',
            key: 'status',
            render: () => { }
        }, {
            title: '执行结果',
            dataIndex: 'result',
            key: 'result',
            render: () => { }
        }]
}

export default deviceRepair
